///////////////////////////////////////////////////////////
//  SaveChoiceCommand.cpp
//  Implementation of the Class SaveChoiceCommand
//  Created on:      12-Oct-2013 14:22:55 PM
//  Original author: Jakkaphan Aiemcharoenjit
///////////////////////////////////////////////////////////

#include "SaveChoiceCommand.h"
#include "CurrentCommand.h"

using namespace UI;
using namespace UI::CMD;

SaveChoiceCommand::SaveChoiceCommand(CChoicesView* choices, CCreateCheckListView* createCheckList)
{
  this->m_type = ICommand::SAVECHOICE_CMD;
  this->m_choicesView = choices;
  this->m_createCheckListView = createCheckList;
}


SaveChoiceCommand::~SaveChoiceCommand()
{

}


void SaveChoiceCommand::Execute()
{

  // Set current command
  this->m_createCheckListView->EditData(this->m_choicesView->GetChoice());
  CurrentCommand::GetInstance()->SetCurrentCommand(this->m_type);
}


ICommand::CommandType SaveChoiceCommand::GetType()
{
	return this->m_type;
}